#!/bin/bash
# curl -s https://gitee.com/yunwe/shell/raw/master/hardware_config.sh | sh
# 获取CPU核心数
cpu=$(nproc)

# 获取内存总量，单位GB
mem=$(free -m | awk 'NR==2{printf "%.0f\n", $2/1024}')

# 获取磁盘总量，单位GB
disk=$(lsblk -b --output SIZE -n -d | awk '{sum+=$1}END{printf "%.0f\n", sum/1024/1024/1024}')

echo "${cpu}核${mem}G ${disk}GB"
